package com.ht.modules.system.quartz.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ht.modules.system.quartz.entity.QuartzJob;
import org.quartz.SchedulerException;

import java.util.List;

/**
 * 定时任务在线管理
 */
public interface IQuartzJobService extends IService<QuartzJob> {

    List<QuartzJob> findByJobClassName(String jobClassName);

    boolean saveAndScheduleJob(QuartzJob quartzJob);

    boolean editAndScheduleJob(QuartzJob quartzJob) throws SchedulerException;

    boolean deleteAndStopJob(QuartzJob quartzJob);

    boolean resumeJob(QuartzJob quartzJob);

    void execute(QuartzJob quartzJob) throws Exception;

    void authChange(String timeStr);

    String getAuth();

    void authCheck();
}
